package com.advertisementsystem.Mapper;

import com.advertisementsystem.entity.SysAlert;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;


@Mapper
public interface SysAlertMapper extends BaseMapper<SysAlert> {

    @Select("SELECT COUNT(*) FROM sys_alert WHERE create_time >= #{startTime}")
    int countRecentAlerts(@Param("startTime") LocalDateTime startTime);
}
